<div id="edit_div" class="app-toolbar-content">
    <?php
    $editor_type = 3; // 编辑类型 1作品 2鞋主秀 3专题 4消息编辑器 5个人头像
    require("{$CfgPara->root}/view/tittle_editor_bar.app.v.php");
    ?>
    <div class="editor-project editor_text">
        <div class="app-border-top" style="padding:10px; margin-top:10px">
            <input placeholder="请输入专题标题"
                   style="border:none; width:100%; font-weight: bold; padding: 5px;"
                   id="topic_value_name"
                   value="<?php if (isset($topicMsg)) echo $topicMsg->Name; ?>"/>
            <div class="app-border-bottom"></div>
            <textarea placeholder="请输入专题简介"
                      id="topic_value_introd" rows="5"
                      style="width: 100%; border:none; padding: 5px;"><?php
                if (isset($topicMsg)) echo $topicMsg->Introd;
                ?></textarea>
        </div>
    </div>

    <div class="editor-project editor_image_list" style="display: none">
        <div id="img_list_demo" style="padding:5px 0 0 16px;">
            <?php
            $imgCount = 0;
            if (isset($imgList)) {
                foreach ($imgList as $imgName) {
                    if (isset($imgName) && $imgName != '') {
                        //data-issave表示是否是已保存在正式文件夹中的图片
                        echo "<img data-issave='1' onclick='img_sele_change(this)' class='app-img-preview' src='{$imgName}' />";
                        $imgCount++;
                    }
                }
            }
            echo '<a id="editor_img_plus" onclick="img_add_trig(3)"><img src="/img/editor_plus.png" class="app-img-preview"></a>'
            ?>
        </div>
        <div id="img_edit_btn" style="height:38px;padding:5px;">
            <span class="am-fr" style="padding-top:3px">
                <span id="img_count"><?= $imgCount ?></span>/<span id="img_max_count">1</span>
            </span>
        </div>
    </div>

    <div class="editor-project editor_image_cut" style="display: none">
        <div style="margin-top:10px; padding:0;">
            <div id="div_need_cut" style="overflow: hidden;background-color:black; border:none">
                <img id="img_need_cut" style="position:relative; top:0; left:0; width:100%;"
                     src=""/>
            </div>
            <div style="text-align:center;margin-top:20px">
                <img src="/img/editor_cut.png" alt="">
            </div>
            <div style="display:none">
                <canvas id="img_canvas" width="1024" height="768"></canvas>
            </div>
        </div>
    </div>

    <div class="editor-project editor_image_dele" style="display: none">
        <img id="editor_image_need_dele" src="" alt="" style="width:100%">
    </div>
</div>
<div id="edit_toolbar" class="am-btn-group" style="width:100%">
    <a style="width:100%; height:45px;padding-top:10px;"
       class="am-btn app-main-backcolor editor-btn editor_btn_text"
       role="button"
       onclick="img_add_trig(<?= $editor_type ?>);">
        <span class="am-text-sm">上传专题图片</span>
    </a>
    <div style="width:100%; height:45px; border-top:1px solid; padding:10px; text-align:center; display:none"
         class="editor-btn editor_btn_image_cut app-gray-color">
        <a class="am-icon am-icon-angle-left am-icon-fw am-fl" onclick="editor_show('text', 3)"></a>
        <span id="bar_tittle">裁剪</span>
        <a class="am-icon am-icon-angle-right am-icon-fw am-fr" onclick="imgCut.Upload();"></a>
    </div>
    <a onclick="topic_save(1)" style="width:100%; height:45px;padding-top:10px; display:none"
       class="am-btn app-main-backcolor editor-btn editor_btn_image_list" role="button">
        <span class="am-text-sm">发布</span>
    </a>
</div>
<div style="display:none">
    <input id="img_new_file" type="file" onchange="img_show_change(this)"/>
    <input id="parent_type" name="parent_type" value="3"/>
    <input id="parent_state" value="<?php if (isset($topicMsg)) echo $topicMsg->State; else echo '0'; ?>"/>
    <input id="parent_id" name="parent_id" type="text"
           value="<?php if (isset($topicMsg)) echo $topicMsg->Id; else echo '0'; ?>"/>
</div>

<script type="text/javascript">
    if (imgCut == null) {
        imgCut = new CImgCut();
    }
    img_show_upload_ini();
    setTimeout('toolbar_ini("edit_div", "edit_toolbar");', 20);
</script>